const parentCode = 'productionPlan'
export default [
  {
    path: "/productionPlan",
    meta: {
      title: "生产计划",
      code: parentCode, //来确定是哪个模块，一级菜单的code
    },
    component: (resolve) => require(["@/views/productionPlan"], resolve),
    children: [
      {
        path: "/",
        redirect: "patrolPlanManage",
      },
      {
        path: "maintenancePlan",
        name: "maintenancePlan",
        meta: {
          title: "维保计划",
          parentCode: parentCode, // 来确定是哪个模块，一级菜单的 code
          code: "maintenancePlan", // 二级菜单的 code
        },
        component: (resolve) =>
          require(["@/views/productionPlan/maintenancePlan"], resolve),
      },
      {
        path: "overhaulPlan",
        meta: {
          title: "检修计划",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "overhaulPlan", //二级菜单的code
        },
        component: (resolve) =>
          require(["@/views/productionPlan/overhaulPlan"], resolve),
        children: [
          {
            path: "/",
            redirect: "overhaulPlanPackage",
          },
          {
            path: "overhaulPlanPackage",
            name: "overhaulPlanPackage",
            meta: {
              title: "检修计划包",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "overhaulPlan", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/overhaulPlan/overhaulPlanPackage",
              ], resolve),
          },
          {
            path: "bigChangePlan",
            name: "bigChangePlan",
            meta: {
              title: "大修计划",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "overhaulPlan", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/overhaulPlan/bigChangePlan",
              ], resolve),
          },
          {
            path: "plannedMaintenancePlan",
            name: "plannedMaintenancePlan",
            meta: {
              title: "计划性检修计划",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "overhaulPlan", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/overhaulPlan/plannedMaintenancePlan",
              ], resolve),
          },
          {
            path: "experimentPlan",
            name: "experimentPlan",
            meta: {
              title: "试验计划",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "overhaulPlan", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/overhaulPlan/experimentPlan",
              ], resolve),
          },
        ],
      },
      {
        path: "patrolPlanManage",
        meta: {
          title: "巡视计划",
          parentCode: parentCode, //来确定是哪个模块，一级菜单的code
          code: "patrolPlanManage", //二级菜单的code
        },
        component: (resolve) =>
          require(["@/views/productionPlan/patrolPlanManage"], resolve),
        children: [
          {
            path: "/",
            redirect: "patrolPlan",
          },
          {
            path: "patrolPlan",
            name: "patrolPlan",
            meta: {
              title: "巡视计划",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "patrolPlanManage", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/patrolPlanManage/patrolPlan",
              ], resolve),
          },
          {
            path: "patrolPoint",
            name: "patrolPoint",
            meta: {
              title: "巡视点",
              parentCode: parentCode, //来确定是哪个模块，一级菜单的code
              code: "patrolPlanManage", //二级菜单的code
            },
            component: (resolve) =>
              require([
                "@/views/productionPlan/patrolPlanManage/patrolPoint",
              ], resolve),
          },
        ],
      },
    ],
  },
];